package com.iplatform.file.function.meta.domain;

/**
 * 
 * @author king
 *
 */
public class EtlTableHistoryBean {
	/**
	 * 表的名称
	 */
	private String tableName = "";
	/**
	 * 开始同步的时间
	 */
	private String beginDate = "";
	/**
	 * 结束同步的时间
	 */
	private String endDate = "";
	/**
	 * 当前表同步的状态
	 */
	private String synStatus = "";
	/**
	 * 同步数据的总数
	 */
	private int synTotalCount = 0;
	/**
	 * 同步成功的数据总数
	 */
	private int synSuccessCount = 0;
	/**
	 * 同步的脚本
	 */
	private String synSql = "";
	/**
	 * 表的类型
	 */
	private String tableType = "";
	/**
	 * 耗时多少
	 */
	private String durtion;

	public String getDurtion() {
		return durtion;
	}

	public void setDurtion(String durtion) {
		this.durtion = durtion;
	}

	public String getTableType() {
		return tableType;
	}

	public void setTableType(String tableType) {
		this.tableType = tableType;
	}

	public String getTableName() {
		return tableName;
	}

	public void setTableName(String tableName) {
		this.tableName = tableName;
	}

	public String getBeginDate() {
		return beginDate;
	}

	public void setBeginDate(String beginDate) {
		this.beginDate = beginDate;
	}

	public String getEndDate() {
		return endDate;
	}

	public void setEndDate(String endDate) {
		this.endDate = endDate;
	}

	public String getSynStatus() {
		return synStatus;
	}

	public void setSynStatus(String synStatus) {
		this.synStatus = synStatus;
	}

	public int getSynTotalCount() {
		return synTotalCount;
	}

	public void setSynTotalCount(int synTotalCount) {
		this.synTotalCount = synTotalCount;
	}

	public int getSynSuccessCount() {
		return synSuccessCount;
	}

	public void setSynSuccessCount(int synSuccessCount) {
		this.synSuccessCount = synSuccessCount;
	}

	public String getSynSql() {
		return synSql;
	}

	public void setSynSql(String synSql) {
		this.synSql = synSql;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((beginDate == null) ? 0 : beginDate.hashCode());
		result = prime * result + ((durtion == null) ? 0 : durtion.hashCode());
		result = prime * result + ((endDate == null) ? 0 : endDate.hashCode());
		result = prime * result + ((synSql == null) ? 0 : synSql.hashCode());
		result = prime * result + ((synStatus == null) ? 0 : synStatus.hashCode());
		result = prime * result + synSuccessCount;
		result = prime * result + synTotalCount;
		result = prime * result + ((tableName == null) ? 0 : tableName.hashCode());
		result = prime * result + ((tableType == null) ? 0 : tableType.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (getClass() != obj.getClass()) {
			return false;
		}
		EtlTableHistoryBean other = (EtlTableHistoryBean) obj;
		if (beginDate == null) {
			if (other.beginDate != null) {
				return false;
			}
		} else if (!beginDate.equals(other.beginDate)) {
			return false;
		}
		if (durtion == null) {
			if (other.durtion != null) {
				return false;
			}
		} else if (!durtion.equals(other.durtion)) {
			return false;
		}
		if (endDate == null) {
			if (other.endDate != null) {
				return false;
			}
		} else if (!endDate.equals(other.endDate)) {
			return false;
		}
		if (synSql == null) {
			if (other.synSql != null) {
				return false;
			}
		} else if (!synSql.equals(other.synSql)) {
			return false;
		}
		if (synStatus == null) {
			if (other.synStatus != null) {
				return false;
			}
		} else if (!synStatus.equals(other.synStatus)) {
			return false;
		}
		if (synSuccessCount != other.synSuccessCount) {
			return false;
		}
		if (synTotalCount != other.synTotalCount) {
			return false;
		}
		if (tableName == null) {
			if (other.tableName != null) {
				return false;
			}
		} else if (!tableName.equals(other.tableName)) {
			return false;
		}
		if (tableType == null) {
			if (other.tableType != null) {
				return false;
			}
		} else if (!tableType.equals(other.tableType)) {
			return false;
		}
		return true;
	}

}
